﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;

public partial class _Default : System.Web.UI.Page
{
    GetData getData;
    protected void Page_Load(object sender, EventArgs e)
    {
        //GetSanPhamByMaLoaiSP();
    }

    //public void GetSanPhamByMaLoaiSP()
    //{
    //    getData = new GetData();
    //    List<SanPham> listResult = getData.GetAllSP();
    //    if (listResult.Count > 0)
    //    {
    //        GridSanPham.DataSource = listResult;
    //        GridSanPham.DataBind();
    //    }
    //    else
    //    {
    //        //Label1.Text = "Hiện chưa có sản phẩm nào trong mục này!";
    //    }
    //}

    //protected void GridBooks_PageIndexChanging(object sender, GridViewPageEventArgs e)
    //{
    //    GridSanPham.PageIndex = e.NewPageIndex;
    //    GridSanPham.DataSource = getData.GetAllSP();
    //    GridSanPham.DataBind();
    //}

    //protected void GridBooks_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    //{
    //    Response.Redirect("GioHang.aspx?MaSP=" + ((Label)GridSanPham.Rows[e.NewSelectedIndex].FindControl("lblMaSP")).Text);
    //}    
}